﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<HomeService.Models.ServiceRequestPhoto>" %>

<div class="photo">

	<p class="image"><img src="<%: Url.Action("GetPhotoImage", "ServiceRequest", new { Model.Id }) %>" alt="Huoltokuva" /></p>

	<% using (Html.BeginForm("UpdatePhotoDescription", "ServiceRequest")) { %>
		<%: Html.HiddenFor(x => x.Id) %>
		<p class="description"><%: Html.EditorFor(x => x.Description) %></p>
		<input type="submit" class="updateDescription" value="Päivitä kuvaus" />
	<% } %>

	<% using (Html.BeginForm("RemovePhoto", "ServiceRequest")) { %>
		<%: Html.HiddenFor(x => x.Id) %>
		<input type="submit" class="removePhoto" value="Poista kuva" />
	<% } %>
</div>